<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>My JSP 'memberCenter.jsp' starting page</title>
    <base href="<%=basePath%>">
	<link rel="stylesheet" href="assets/plugins/bootstrap/css/bootstrap.css"> 
	<link rel="stylesheet" href="assets/css/member/membercenter.css">
	<script type="text/javascript" src="assets/js/jquery-1.7.2.js"></script>
	<link rel="stylesheet" href="assets/plugins/kindeditor/themes/default/default.css" />
	<link rel="stylesheet" href="assets/plugins/kindeditor/plugins/code/prettify.css" />
	<script charset="utf-8" src="assets/plugins/kindeditor/kindeditor.js"></script>
	<script charset="utf-8" src="assets/plugins/kindeditor/lang/zh_CN.js"></script>
	<script charset="utf-8" src="assets/plugins/kindeditor/plugins/code/prettify.js"></script>
	<script>
	
	KindEditor.ready(function(K) {

			var editor1 = K.create('textarea[name="article.content"]', {
				cssPath : 'assets/plugins/kindeditor/plugins/code/prettify.css',
				uploadJson : 'assets/plugins/kindeditor/jsp/upload_json.jsp',
				fileManagerJson : 'assets/plugins/kindeditor/jsp/file_manager_json.jsp',
				allowFileManager : true,
				afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
				}
			});
			prettyPrint();
		});
	</script>
	<style type="text/css">
		#editpanel form  input[type='text']{
			width:250px;
			height:40px;
			font-size:15px;
			margin-left:3em;
			margin-bottom:1em;
		}
		#editpanel form  input[type='submit']{
			display:block;
			width:100px;
			height:35px;
			border:none;
			background:#565656;
			float:left;
			
			margin-left:210px;
		}
		#editpanel form  input[type='submit']:hover{
			border:1 solid white;
			background:#345563;
		}
		#editpanel form textarea {
			width:700px;
			height:300px;
			visibility:hidden;
		}
	</style>
</head>
<body>
	    <div id="mainbox" class="container"> 
	    <div id="header">
	    	<div id="toplogo" style="background:url('assets/images/logo/back_top.jpg');">
	    			<div class="topsign">Java Share</div>
	    	</div>
	    	<div id="menu">
	    		<div class="navbar">
				  <div class="navbar-inner">
				    <div class="container">
				      <ul class="nav">
							<li><a href="member_memberCenter">用户中心</a></li>
						  <li><a href="member_memberCenter?module=article">我的文章</a></li>
						  <li><a href="member_memberCenter?module=tiezi">帖子中心</a></li>
						  <li><a href="member_memberCenter?module=myinfo">我的信息</a></li>
						   	<li><a href="member_logoff" class="pull-right">注销</a></li>
					      	
						</ul>
				    </div>
				  </div>
				</div>
	    	</div>
	    </div>
	    <div id="content" >
	    	<div id="leftColumn">
				<div id="editpanel">
					
					<form name="example" method="post" action="article_addArticle">
						<input  type="text" name="article.title" placeholder="文章标题"/>
						<textarea name="article.content" cols="100" rows="8" placeholder="正文内容">
						
						</textarea>
						<br />
						<br/>
						<!-- 防止多次提交 -->
						文章类型:
						
						<s:action name="artCategoryAction!getCategory" executeResult="true"></s:action>
						
					
						<input type="text" name="article.tags" placeholder="标签"> 
						
						<s:token></s:token>
						<input type="submit" name="button" value="发布文章" />
					</form>
					
				</div>
			</div>
			<div id="rightColumn">
			
			</div>
		</div>
	</div>
</body>
</html>